-- GENERATED SPELL FOR [Coilskar Witch] --


function spell0_24696(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(20299,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24696', 2000, 1)
end

function spell1_24696(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(46150,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24696', 2000, 1)
end

function spell2_24696(pUnit, Event) --@Frost Arrow,n/a--
pUnit:FullCastSpellOnTarget(44639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24696', 598, 1)
end

function spell3_24696(pUnit, Event) --@Mana Shield,Self--
pUnit:FullCastSpellOnTarget(17741,pUnit)
pUnit:RegisterEvent('Sorts_24696', 644, 1)
end

function spell4_24696(pUnit, Event) --@Mana Shield,Self--
pUnit:FullCastSpellOnTarget(46151,pUnit)
pUnit:RegisterEvent('Sorts_24696', 582, 1)
end

function spell5_24696(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24696', 651, 1)
end

function spell6_24696(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(35946,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24696', 581, 1)
end

function Sorts_24696(pUnit, Event)
local choix_sorts_24696 = math.random(0, 6)
if choix_sorts_24696 == 0 then
pUnit:RegisterEvent('spell0_24696', 1, 1)
end
if choix_sorts_24696 == 1 then
pUnit:RegisterEvent('spell1_24696', 1, 1)
end
if choix_sorts_24696 == 2 then
pUnit:RegisterEvent('spell2_24696', 1, 1)
end
if choix_sorts_24696 == 3 then
pUnit:RegisterEvent('spell3_24696', 1, 1)
end
if choix_sorts_24696 == 4 then
pUnit:RegisterEvent('spell4_24696', 1, 1)
end
if choix_sorts_24696 == 5 then
pUnit:RegisterEvent('spell5_24696', 1, 1)
end
if choix_sorts_24696 == 6 then
pUnit:RegisterEvent('spell6_24696', 1, 1)
end
end

function mob24696_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24696', math.random(1500, 3000), 1)
end

function mob24696_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24696_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24696_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24696, 1, 'mob24696_Action')
RegisterUnitEvent(24696, 2, 'mob24696_Leave')
RegisterUnitEvent(24696, 3, 'mob24696_Kill')
RegisterUnitEvent(24696, 4, 'mob24696_Die')
